package com.lantu.sys.controller;

import com.lantu.com.common.vo.Result;
import com.lantu.sys.entity.Goods;
import com.lantu.sys.entity.User;
import com.lantu.sys.mapper.GoodsMapper;
import com.lantu.sys.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author DongJun
 * @since 2023-05-30
 */
@RestController
@RequestMapping("/sys/goods")
public class GoodsController {
    @Autowired
    private IGoodsService goodsService;
    @GetMapping("/list")
    public Result<List<Goods>> getAll(){
      List<Goods> list=goodsService.selectAll();
       return  Result.success(list);
    }
    @GetMapping("/list")
    public Result<List<Goods>> getsss(){
        List<Goods> list=goodsService.selectAll();
        return  Result.success(list);
    }
    @PostMapping("/list")
    public Result<List<Goods>> add(){
        List<Goods> list=goodsService.selectAll();
        return  Result.success(list);
    }
}
